| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { EMPTY_ARRAY } from "./consts" |
||
| 44 | |||
| 45 | //TODO Consider undefined |
||
| 46 | function joinWithLead(value: Falsy|ClassValue, arr: readonly string[]) :string { |
||
| 47 | const str1 = value || "" |
||
| 48 | if (!arr.length) |
||
| 49 | return str1 |
||
| 50 | |||
| 51 | const str2 = arr.join(" ") |
||
| 52 | if (!str1) |
||
| 53 | return str2 |
||
| 54 | |||
| 55 | return `${str1} ${str2}` |
||
| 56 | } |